const whiteList = [
    '/pages/index/index',
    '/pages/mine/index',
    '/pages/word/index',
    // '/pages/order/index',
    '/pages/login',
    ]

function hasPermission(url) {
    let USERINFO = uni.getStorageSync('USERINFO');
    
    USERINFO = Boolean(Number(USERINFO)); //返回布尔值
    // 在白名单中或有登录判断条件可以直接跳转
    if (whiteList.indexOf(url) !== -1 || USERINFO) {
    return true
    }
    return false
    
    }